/* 首页组件样式 */
.blog-container {
    position: relative;
    overflow: hidden;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,113,227,0.1);
    pointer-events: none;
}

.particle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 20%;
    left: 10%;
    background: radial-gradient(circle, rgba(0,113,227,0.1) 0%, transparent 70%);
    filter: blur(30px);
}

.particle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 70%;
    background: radial-gradient(circle, rgba(0,113,227,0.08) 0%, transparent 70%);
    filter: blur(20px);
}

.particle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 30%;
    left: 50%;
    background: radial-gradient(circle, rgba(0,113,227,0.05) 0%, transparent 70%);
    filter: blur(15px);
}

.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    position: relative;
    align-items: start;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar {
    width: 100%;
    position: sticky;
    top: 120px;
    height: calc(100vh - 150px);
    overflow-y: auto;
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    margin-right: 2rem;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,113,227,0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0,113,227,0.5);
}

.recommended-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-post {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(0,113,227,0.05);
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
}

.recommended-post:hover {
    background: rgba(0,113,227,0.1);
    transform: translateX(5px);
}

.post-title {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.post-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 10px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    align-content: start;
}

.post-card {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,113,227,0.1) 0%, transparent 100%);
    z-index: -1;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.read-more {
    color: var(--apple-blue);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* 暗色主题样式 */
.dark-theme .sidebar {
    background: rgba(30,30,30,0.9);
    border-color: rgba(255,255,255,0.1);
}

.dark-theme .recommended-post {
    background: rgba(0,113,227,0.1);
    color: #eee;
}

.dark-theme .recommended-post:hover {
    background: rgba(0,113,227,0.2);
}

.dark-theme .post-meta {
    color: #aaa;
}

.dark-theme .post-card {
    background: rgba(30,30,30,0.95);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        margin-right: 0;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}